﻿#ifndef MAINACTION_H
#define MAINACTION_H


#include <QThread>
#include <QTimer>
#include "datebase.h"
#include "mysqllink.h"
#include "udpsocket.h"
#define mysql_connectTime 300*60000
#define mysql_disconnectTime 10000
#define UDP_PORT 6996
#define SendPort 5000
class MainAction : public QThread
{
    Q_OBJECT
public:
    explicit MainAction(QObject *parent = 0);
private:
    QTimer *timer_dataBaseLink;
    mySqlLink *mysql_link;
    QDateTime mysql_conTime;
    udpSocket *udpLink;
    //axisTask * axis;
private slots:
    void initialization();
    void initTimer();
    void initUdp();
    void udpRecProcess();
    void initDatebase();
    void dataBaseLink();

    void UdpRecive();

    void slotRec();
signals:
    void sendSql();
    void signalaxis();
public slots:
    
};

#endif // MAINACTION_H
